<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>京东首页</title>	
	<link rel="stylesheet" href="http://localhost/dshop/template/default/css/head.css" type="text/css" />
	<script type="text/javascript" src='http://localhost/dshop/template/default/js/jquery-1.11.0.min.js'></script>
	<script type="text/javascript" src='http://localhost/dshop/template/default/js/head.js'></script>
	<script type="text/javascript" src='http://localhost/dshop/template/default/js/fenlei.js'></script>
	<link rel="stylesheet" href="http://localhost/dshop/template/default/css/fenlei.css" />
</head>
<body>
<!-- 最顶部的可关闭广告 -->
<!-- <div id='top_ad'><img src="http://localhost/dshop/template/default/images/top_ad.jpg" alt="" /></div> -->
<!-- 最顶部的可关闭广告结束-->
<!-- 头部灰色区域 -->
	<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><div id="top">
		<div class="top_main">
			<!-- 左侧 -->
			<div class="top_l fl">
				<p class="shoucang"><span class='fl'></span><a href="" class='fl'>收藏aDo</a></p>
				<!-- <p class="didian">
					<span class='tu fl'> <a href="" class="fl">[更换]</a>
					</p> -->
			</div>
			<!-- 左侧结束 -->
			<!-- 右侧 -->
			<div class="top_r fr ">
				<ul>
					<li>
						<?php if($_SESSION['username']){?>你好，<?php echo $_SESSION['username'];?>&nbsp&nbsp<a href="<?php echo U('Login/out');?>">[退出]</a>
						<?php  }else{ ?>
						<span class='fl'>您好，欢迎来到aDo！</span><a href="<?php echo U('Login/index');?>" class='fl'>[登录]</a> <a href="<?php echo U('Login/reg');?>" class="denglu fl">[免费注册]</a> <span class='xian fl'>|</span>
						<?php }?>
					</li>
					<li>
						<?php if($_SESSION['username']){?>
						<a href="<?php echo U('OrderForm/orderpage');?>" class="dingdan fl">我的订单</a>
						<span class='xian fl'>|</span>
						<?php  }else{ ?>
						<a href="<?php echo U('Login/index');?>" class="dingdan fl">我的订单</a>
						<span class='xian fl'>|</span>	
						<?php }?>
					</li>
					<!-- <li class='huiyuan'><a href="" class='fl'>会员俱乐部</a><span class='xian fl'>|</span></li> -->
					<li class="shouji">
						<div class="xia">
							<div class="xia_top">
								<div class="xia_top_l"></div>
								<div class="xia_top_r">
									<span>扫描我，即刻下载</span>
									<span class='hongse'>aDo客户端</span>
								</div>
							</div>
							<div class="xia_foot">
								<span class='xia_foot1'></span><span class='xia_foot2'></span>
							</div>
						</div>
						<div class="topnei"><span></span></div>
						<p>
							<a href="" class="fl">手机aDo</a><span class='daosan fl'></span><span class='xian fl'>|</span>
						</p>
						
					</li>
					<li class="li_kehu">
						<div class='xiabai'>
							<a href="">帮助中心</a>
							<a href="">售后服务</a>
							<a href="">在线客服</a>
							<a href="">投诉中心</a>
							<a href="">客服邮箱</a>
						</div>
						<div class="kehu">
							<a href="" class='fl'>客户服务</a><span class='daosan fl'></span><span class='xian fl'>|</span>
						</div>
						
					</li>
					<li class="li_kong">
						<div class="kong_wang">
							
						</div>
						<div class="wang">
							<a href="" class='fl'>网站导航</a><span class='daosan fl'></span>
						</div>
						<div class="kong_wang_da">
							<div class="kong_l">
								<p>特色栏目</p>
								<a href="">校园之星</a>
								<a href="">视频购物</a>
								<a href="">aDo社区</a>
								<a href="">在线读书</a>
								<a href="">装机大师</a>
								<a href="">aDo卡</a>
								<a href="">家装城</a>
								<a href="">搭配购</a>
								<a href="">我喜欢</a>
							</div>
							<div class="kong_m">
								<p>企业服务</p>
								<a href="">企业客户</a>
								<a href="">办公直通车</a>
							</div>
							<div class="kong_r">
							<p>旗下网站</p>
							<a href="">迷你挑</a>
							<a href="">English Site</a>
							</div>
							
						</div>
					</li>
				</ul>
			</div>
			<!-- 右侧结束 -->
		</div>
</div>
	
<!-- 头部灰色区域结束 -->
<!-- 中间主体区域 -->
	<div id="main">
	<!-- logo区域 -->
	<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?>
<div class="main_logo ">
			<a href="http://localhost/dshop"><img src="http://localhost/dshop/template/default/images/logo.png" alt="" class="logo" /></a>
			<div class="sousuo">
				<form action="<?php echo U('Search/search');?>" method="post"> 
					<input type="text"  class="shuru fl" name="search" value='平板电脑' />
					<input type="submit" class="tijiao fr" value="搜索" />
				</form>
			</div>
			<p >
				<span class='fl'>热门搜索：</span><a href="<?php echo U('Search/search',array('search'=>'单反相机'));?>" class="hong">单反相机</a><a href="<?php echo U('Search/search',array('search'=>'超极本'));?>">超极本</a><a href="<?php echo U('Search/search',array('search'=>'T恤'));?>">T恤</a><a href="<?php echo U('Search/search',array('search'=>'连衣裙'));?>">连衣裙</a><a href="<?php echo U('Search/search',array('search'=>'轮胎'));?>">轮胎</a><a href="<?php echo U('Search/search',array('search'=>'洋酒'));?>">洋酒</a>
			</p>
			<div class="mine">
				<!-- <div class="mine_kong_da">
					<h3>您好，请<a href="">登录</a></h3>
					<div class="left">
					<a href="">待处理订单</a>
					<a href="">咨询回复</a>
					<a href="">降价商品</a>
					<a href="">优惠券</a>

					</div>
					<div class="right">
					<a href="">我的订单 ></a>
					<a href="">我的关注 ></a>
					<a href="">我的京豆 ></a>
					<a href="">为我推荐 ></a>
					</div>
					<div class="di">
						<h3><a href="">浏览记录历史</a>最新浏览的商品：</h3>
						<ul>
							<li><a href=""><img src="http://localhost/dshop/template/default/images/biaobiao.jpg" alt="" /></a></li>
							<li><a href=""><img src="http://localhost/dshop/template/default/images/biaobiao.jpg" alt="" /></a></li>
							<li><a href=""><img src="http://localhost/dshop/template/default/images/biaobiao.jpg" alt="" /></a></li>
							<li><a href=""><img src="http://localhost/dshop/template/default/images/biaobiao.jpg" alt="" /></a></li>
							<li><a href=""><img src="http://localhost/dshop/template/default/images/biaobiao.jpg" alt="" /></a></li>
						</ul>
					</div>
				</div> -->
				<div class="mine_kong"></div>
				<div class="mine_nei">
					<a href="" class="mine_a fl">我的京东</a><span class='xiajiao fl'></span>
				</div>
				
			</div>
			<div class="jiesuan">

				<?php if($_SESSION['cart']){?>
					
					<div class="jie_kong_da suan">
						<?php $hd["list"]["c"]["total"]=0;if(isset($_SESSION['cart']['goods']) && !empty($_SESSION['cart']['goods'])):$_id_c=0;$_index_c=0;$lastc=min(1000,count($_SESSION['cart']['goods']));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($_SESSION['cart']['goods'],0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

					<div class="buy">
						<a class="buy_pic" href="<?php echo U('Index/content',array('gid'=>$c['gid']));?>"><img style="width:50px;height:50px;" src="<?php echo $c['pic'];?> " /></a>
						<a style="line-height:14px;" class="gname" href="<?php echo U('Index/content',array('gid'=>$c['gid']));?>"><?php echo hd_substr($c['gname'],40);?></a>
						<span class="price">￥<?php echo $c['price'];?><b style="color:#999999;">x<?php echo $c['num'];?></b></span>
						<a class="delete" href="<?php echo U('Pay/del',array('stid'=>$c['stid']));?>">删除</a>
						<!-- <?php echo $c;?> -->
					</div>
					<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
					<div class="bottom">
						<a href="<?php echo U('Cart/index');?>">去购物车结算</a>
						<p>共&nbsp&nbsp<strong><?php echo $_SESSION['cart']['totalnum'];?></strong>&nbsp&nbsp件商品&nbsp&nbsp&nbsp 共计<span>￥<?php echo $_SESSION['cart']['totalprice'];?></span></p>
					</div>
					</div>
					<div class="jie">
					<a href="<?php echo U('Cart/index');?>" class="fl">去购物车结算</a><span class='youjiao fl'></span>
					</div>
					
				<?php  }else{ ?>
				<div class="jie_kong_da">
					<span class='gou'></span>
					<span class='gouwen'>购物车中还没有商品，赶紧选购吧！</span>
				</div>
				<div class="jie">
					<a href="<?php echo U('Login/index');?>" class="fl">去购物车结算</a><span class='youjiao fl'></span>
				</div>
				<?php }?>
			</div> 
</div>
<div class="menu">
			<div class="menu_l fl ">
				<a href="" class="quan_fen">全部商品分类</a>
					<!-- 左分类以及轮换图 -->
					<!-- 左侧 -->
						<div class="middle_l fl">
							<ul>
					
				<?php $hd["list"]["cat"]["total"]=0;if(isset($category) && !empty($category)):$_id_cat=0;$_index_cat=0;$lastcat=min(1000,count($category));
$hd["list"]["cat"]["first"]=true;
$hd["list"]["cat"]["last"]=false;
$_total_cat=ceil($lastcat/1);$hd["list"]["cat"]["total"]=$_total_cat;
$_data_cat = array_slice($category,0,$lastcat);
if(count($_data_cat)==0):echo "";
else:
foreach($_data_cat as $key=>$cat):
if(($_id_cat)%1==0):$_id_cat++;else:$_id_cat++;continue;endif;
$hd["list"]["cat"]["index"]=++$_index_cat;
if($_index_cat>=$_total_cat):$hd["list"]["cat"]["last"]=true;endif;?>

			
					<li>
                        <div class="youkuang" >
                        	<?php $hd["list"]["d"]["total"]=0;if(isset($cat['_data']) && !empty($cat['_data'])):$_id_d=0;$_index_d=0;$lastd=min(1000,count($cat['_data']));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($cat['_data'],0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

							<div class="youkuang_l">
								<div class="youkuang_l_div">
									<div class="youkuang_l_div_zi">
						
										<div>
											<a href="<?php echo getCategoryUrl($d['cid']);?>"><?php echo $d['cname'];?></a></div>
										<ul>
											<?php $hd["list"]["e"]["total"]=0;if(isset($d['_data']) && !empty($d['_data'])):$_id_e=0;$_index_e=0;$laste=min(1000,count($d['_data']));
$hd["list"]["e"]["first"]=true;
$hd["list"]["e"]["last"]=false;
$_total_e=ceil($laste/1);$hd["list"]["e"]["total"]=$_total_e;
$_data_e = array_slice($d['_data'],0,$laste);
if(count($_data_e)==0):echo "";
else:
foreach($_data_e as $key=>$e):
if(($_id_e)%1==0):$_id_e++;else:$_id_e++;continue;endif;
$hd["list"]["e"]["index"]=++$_index_e;
if($_index_e>=$_total_e):$hd["list"]["e"]["last"]=true;endif;?>

											<li><span>|</span><a href="<?php echo getCategoryUrl($e['cid']);?>"><?php echo $e['cname'];?></a></li> 
											<?php $hd["list"]["cat"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
										</ul>
									</div>
								</div>
							</div>
						<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>	
						</div>
						<div class="bao">
							<span></span>
							<div class="kong"></div>
							<div class="kongshang">
							<a href="<?php echo getCategoryUrl($cat['cid']);?>"><?php echo $cat['cname'];?></a></div>
						</div>
					</li>
				<?php $hd["list"]["e"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>	
					
				</ul>
						</div>
					<!-- 左侧结束 -->
					<!-- 左分类以及轮换图结束-->
			</div>
			<div class="menu_r fl">
				<a href="http://localhost/dshop" class="active">首页</a>
				<a href="<?php echo U('Search/search',array('search'=>'服装'));?>">服装</a>
				<a href="<?php echo U('Search/search',array('search'=>'电脑'));?>">电脑</a>
				<a href="<?php echo U('Search/search',array('search'=>'珠宝'));?>">珠宝</a>
				<a href="<?php echo U('Search/search',array('search'=>'酒'));?>">酒</a>
			</div>
</div>
		
	<!-- 导航区域结束 -->
	<!-- 面包屑导航 -->
	<div id="mian">
		<?php $hd["list"]["l"]["total"]=0;if(isset($db) && !empty($db)):$_id_l=0;$_index_l=0;$lastl=min(1000,count($db));
$hd["list"]["l"]["first"]=true;
$hd["list"]["l"]["last"]=false;
$_total_l=ceil($lastl/1);$hd["list"]["l"]["total"]=$_total_l;
$_data_l = array_slice($db,0,$lastl);
if(count($_data_l)==0):echo "";
else:
foreach($_data_l as $key=>$l):
if(($_id_l)%1==0):$_id_l++;else:$_id_l++;continue;endif;
$hd["list"]["l"]["index"]=++$_index_l;
if($_index_l>=$_total_l):$hd["list"]["l"]["last"]=true;endif;?>

		<strong style="font-size:12px;color:#666666;" class="da"><?php echo $l['cname'];?></strong> > 
		<?php $hd["list"]["l"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
		<!-- <a href="">摄影摄像</a> > <a href="">单反相机</a> > <a href="">尼康（Nikon）</a> > <a href="">尼康D3200</a> -->
	</div>
	<!-- 面包屑导航结束 -->
	<!-- 主体内容区域 -->
	<div id="content">
		<div class="l">
			<div class="lei">
				<ul>
					<li class="biao">
						<span></span>
						<?php echo $name;?>
					</li>
					<li class="kong">
								<?php
		$Model = M('category');
		$result = $Model->where("pid=$pid")->all();
		foreach($result as $field):
			$field['url']=U('category',array('cid'=>$field['cid']));
		?>
						<a href="<?php echo $field['url'];?>"><?php echo $field['cname'];?></a>
						<?php endforeach;?>
					</li>
				</ul>
				
			</div>
			<?php $hd["list"]["c"]["total"]=0;if(isset($cate) && !empty($cate)):$_id_c=0;$_index_c=0;$lastc=min(1000,count($cate));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($cate,0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

			<a href="<?php echo U('content');?>" style="width:210px;height:240px;" class="ad1">
				<img style="width:210px;height:240px;" src="<?php echo $c['index_pic'];?>" alt="" />
			</a>
			<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>


			<div class="xiao">
				<h2>一周销量排行</h2>
				<ul>
					<?php $hd["list"]["cc"]["total"]=0;if(isset($cc) && !empty($cc)):$_id_cc=0;$_index_cc=0;$lastcc=min(1000,count($cc));
$hd["list"]["cc"]["first"]=true;
$hd["list"]["cc"]["last"]=false;
$_total_cc=ceil($lastcc/1);$hd["list"]["cc"]["total"]=$_total_cc;
$_data_cc = array_slice($cc,0,$lastcc);
if(count($_data_cc)==0):echo "";
else:
foreach($_data_cc as $key=>$cc):
if(($_id_cc)%1==0):$_id_cc++;else:$_id_cc++;continue;endif;
$hd["list"]["cc"]["index"]=++$_index_cc;
if($_index_cc>=$_total_cc):$hd["list"]["cc"]["last"]=true;endif;?>

					<li>
						<span><?php echo $hd['list']['cc']['index'];?></span>
						<p class="show">
							<?php echo $cc['gname'];?>
						</p>
						<div class="hide">
							<a href="" class="l"><img style="width:50px; height:50px;" src="<?php echo $cc['index_pic'];?>" alt="" /></a>
							<p class="r">
								<a href=""><?php echo $cc['gname'];?></a>
								<span>￥<?php echo $cc['price'];?></span>
							</p>
						</div>
					</li>
					<?php $hd["list"]["cc"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
				</ul>
			</div>
		<div id="genju">
		<!-- 最近浏览 -->
		<div class="l">
			<h2><span>最近浏览</span></h2>
			<ul>
				<?php $hd["list"]["b"]["total"]=0;if(isset($browse) && !empty($browse)):$_id_b=0;$_index_b=0;$lastb=min(1000,count($browse));
$hd["list"]["b"]["first"]=true;
$hd["list"]["b"]["last"]=false;
$_total_b=ceil($lastb/1);$hd["list"]["b"]["total"]=$_total_b;
$_data_b = array_slice($browse,0,$lastb);
if(count($_data_b)==0):echo "";
else:
foreach($_data_b as $key=>$b):
if(($_id_b)%1==0):$_id_b++;else:$_id_b++;continue;endif;
$hd["list"]["b"]["index"]=++$_index_b;
if($_index_b>=$_total_b):$hd["list"]["b"]["last"]=true;endif;?>

				<li>
					<a href="<?php echo U('content',array('gid'=>$b['gid']));?>" class="img"><img style="width:50px;height:50px;" src="<?php echo $b['index_pic'];?>" alt="" /></a>
					<p>
						<a href=""><?php echo hd_substr($b['gname'],20);?></a>
						<span>￥<?php echo $b['price'];?></span>
					</p>
				</li>
			<?php $hd["list"]["b"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			
			</ul>
		</div>
		</div>
		<!-- 最近浏览结束 -->
		</div>
		<div class="r">
		<!-- 热卖开始 -->
			<div class="remai">
				<h2>热卖推荐</h2>
				<ul>
							<?php
		$flag=推荐;
		$row=3;
		$cid = explode(',',str_replace(' ','',"$cid"));
		$Model=M('goods');
		if(推荐){
			$result=$Model->limit($row)->where(array('cid'=>$cid,'flag'=>$flag))->all();
		}else{
			$result=$Model->limit($row)->where(array('cid'=>$cid))->all();
		}
		foreach($result as $field):
			$field['url']=U('content',array('gid'=>$field['gid']));
			$field['index_pic']="http://localhost/dshop/".$field['index_pic'];
			$field['price']=$field['price'];
			$field['cid']=$field['cid'];
		?>

					<li>
						<a href="<?php echo $field['url'];?>"><img style="width:100px;height:100px;" src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<div class="r">
							<a href="<?php echo $field['url'];?>"><?php echo hd_substr($field['gname'],23);?></a>
							<p class="tejia">特价：<span>￥<?php echo $field['price'];?></span></p>
							<p class="gou"><a href="<?php echo $field['url'];?>">立即抢购</a></p>
						</div>
					</li>
				  <?php endforeach;?>

				</ul>
			</div>
		<!-- 热卖结束 -->
		<!-- 筛选 -->
			<div class="shaixuan">
				<h2><span><?php echo $name;?></span> - 商品筛选</h2>
				<ul>
					<li class="pin">
						<span class='more'>更多</span>
						<div class="l">
							品牌：
						</div>
						<div class="r">
							<div class="show">
								<a href=""></a>
								
							</div>
							<div class="hide" ><!-- style="display:block;" -->
								<h3>
									<span>所有品牌<b></b></span>
									<span>A<b></b></span>
									<span>B<b></b></span>
									<span>C<b></b></span>
									<span>D<b></b></span>
									<span>E<b></b></span>
									<span>F<b></b></span>
									<span>G<b></b></span>
									<span>H<b></b></span>
									<span>J<b></b></span>
									<span>K<b></b></span>
									<span>L<b></b></span>
									<span>M<b></b></span>
									<span>N<b></b></span>
									<span>O<b></b></span>
									<span>P<b></b></span>
									<span>Q<b></b></span>
									<span>R<b></b></span>
									<span>S<b></b></span>
									<span>T<b></b></span>
									<span>U<b></b></span>
									<span>V<b></b></span>
									<span>W<b></b></span>
									<span>X<b></b></span>
									<span>Y<b></b></span>
									<span>Z<b></b></span>
								</h3>
								<div class="bao">
									<div class="a1 active">
										<a href="">阿玛尼（ARMANI）</a>
										<a href="">阿玛尼（ARMANI）</a>
										<a href="">阿玛尼（ARMANI）</a>
										<a href="">阿玛尼（ARMANI）</a>
										<a href="">阿玛尼（ARMANI）</a>
										<a href="">阿玛尼（ARMANI）</a>
									</div>
									<div class="a2">
										<a href="">巴宝莉（BURBERRY）</a>
										<a href="">巴宝莉（BURBERRY）</a>
										<a href="">巴宝莉（BURBERRY）</a>
										<a href="">巴宝莉（BURBERRY）</a>

									</div>
								</div>
							</div>
						</div>
					</li>

					<?php $hd["list"]["d"]["total"]=0;if(isset($attr) && !empty($attr)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($attr));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($attr,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

					<li class="pin">
						<div class="l">
							<b style="background:"><?php echo $d['attr_name'];?>：<?php echo searchAttrUrl(0,$hd['list']['d']['index'],'全部');?></b>
						</div>
						
						<div class="r">
							<?php $hd["list"]["f"]["total"]=0;if(isset($d['attrvalue']) && !empty($d['attrvalue'])):$_id_f=0;$_index_f=0;$lastf=min(1000,count($d['attrvalue']));
$hd["list"]["f"]["first"]=true;
$hd["list"]["f"]["last"]=false;
$_total_f=ceil($lastf/1);$hd["list"]["f"]["total"]=$_total_f;
$_data_f = array_slice($d['attrvalue'],0,$lastf);
if(count($_data_f)==0):echo "";
else:
foreach($_data_f as $key=>$f):
if(($_id_f)%1==0):$_id_f++;else:$_id_f++;continue;endif;
$hd["list"]["f"]["index"]=++$_index_f;
if($_index_f>=$_total_f):$hd["list"]["f"]["last"]=true;endif;?>

								<a href="javascript:;"><?php echo searchAttrUrl($f['avid'],$hd['list']['d']['index'],$f['attr_value']);?></a>
							<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
						</div>
						
					</li>
					<?php $hd["list"]["f"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
				</ul>
			</div>
		<!-- 筛选结束 -->
		<!--排序 -->
		<div class="paixu">
			<div class="top">
				<div class="l">
					<span>排序：</span>
					<a href="">销量</a>
					<a href="">价格</a>
					<a href="">评论数</a>
					<a href="" class="red">上架时间</a>	
				</div>
				<div class="page">
					<a  href="javascript:;"><?php echo $page;?></a>
				</div>
			</div>
			<div class="bottom">
				<!-- 库存： -->
			</div>
		</div>
		<!--排序结束  -->
		<div class="zhanshi">
			<ul>
				<?php $hd["list"]["g"]["total"]=0;if(isset($goods) && !empty($goods)):$_id_g=0;$_index_g=0;$lastg=min(1000,count($goods));
$hd["list"]["g"]["first"]=true;
$hd["list"]["g"]["last"]=false;
$_total_g=ceil($lastg/1);$hd["list"]["g"]["total"]=$_total_g;
$_data_g = array_slice($goods,0,$lastg);
if(count($_data_g)==0):echo "";
else:
foreach($_data_g as $key=>$g):
if(($_id_g)%1==0):$_id_g++;else:$_id_g++;continue;endif;
$hd["list"]["g"]["index"]=++$_index_g;
if($_index_g>=$_total_g):$hd["list"]["g"]["last"]=true;endif;?>

				<li>
					<a href="<?php echo U('content',array('gid'=>$g['gid'],'cid'=>$g['cid']));?>" class="img"><img src="<?php echo $g['index_pic'];?>" alt="" /></a>
					<a href=""><?php echo hd_substr($g['gname'],30,'...');?></a><br/>
					<span>￥<?php echo $g['price'];?></span>
					<a class="bao">已有5人评价</a>
					<p>北京有货</p>
				</li>
			    <?php $hd["list"]["g"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			</ul>
		<div class="page">
			<a href="javascript:;"><?php echo $page;?></a>
		</div>
		</div>

		<!-- 商品精选 -->
		<!-- <div class="jingxuan">
			<h2>商品精选</h2>
			<ul>
				<li>
					<a href="" class="img"><img src="http://localhost/dshop/template/default/images/rBEhWlJACegIAAAAAAFQlHcKsvMAADbPgFR5KQAAVCs370.jpg" alt="" /></a>
					<a href="" class="text">巴利（BALLY） 男式黑色牛皮配红白织物银色针扣皮带 COLIMAR-35.TG 120 </a>
					<div><span>￥</span>999.00 <p><span>直降</span>已优惠 ￥691</p></div>
				</li>
				<li>
					<a href="" class="img"><img src="http://localhost/dshop/template/default/images/rBEhWlJACegIAAAAAAFQlHcKsvMAADbPgFR5KQAAVCs370.jpg" alt="" /></a>
					<a href="" class="text">巴利（BALLY） 男式黑色牛皮配红白织物银色针扣皮带 COLIMAR-35.TG 120 </a>
					<div><span>￥</span>999.00 <p><span>直降</span>已优惠 ￥691</p></div>
				</li>
				<li>
					<a href="" class="img"><img src="http://localhost/dshop/template/default/images/rBEhWlJACegIAAAAAAFQlHcKsvMAADbPgFR5KQAAVCs370.jpg" alt="" /></a>
					<a href="" class="text">巴利（BALLY） 男式黑色牛皮配红白织物银色针扣皮带 COLIMAR-35.TG 120 </a>
					<div><span>￥</span>999.00 <p><span>直降</span>已优惠 ￥691</p></div>
				</li>
				<li>
					<a href="" class="img"><img src="http://localhost/dshop/template/default/images/rBEhWlJACegIAAAAAAFQlHcKsvMAADbPgFR5KQAAVCs370.jpg" alt="" /></a>
					<a href="" class="text">巴利（BALLY） 男式黑色牛皮配红白织物银色针扣皮带 COLIMAR-35.TG 120 </a>
					<div><span>￥</span>999.00 <p><span>直降</span>已优惠 ￥691</p></div>
				</li>
			</ul>
		</div> -->
		<!-- 商品精选结束 -->
		</div>

	</div>
	<!-- 主体区域结束 -->
	<!-- 最近浏览以及根据浏览猜你喜欢 -->
	
	<!-- 最近浏览以及根据浏览猜你喜欢结束 -->
		
	<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 购物指南 -->
	<!-- <div class="zhinan">
		<dl class="zhinan_dl">
			<dt>
				<span></span>
				<a href="">购物指南</a>
			</dt>
			<dd><a href="">购物流程</a></dd>
			<dd><a href="">会员介绍</a></dd>
			<dd><a href="">团购/机票</a></dd>
			<dd><a href="">常见问题</a></dd>
			<dd><a href="">大家电</a></dd>
			<dd><a href="">联系客服</a></dd>
		</dl>
		<dl class="zhinan_dl">
			<dt>
				<span class='peisong'></span>
				<a href="">配送方式</a>
			</dt>
			<dd><a href="">购物流程</a></dd>
			<dd><a href="">会员介绍</a></dd>
			<dd><a href="">团购/机票</a></dd>
			<dd><a href="">常见问题</a></dd>
			<dd><a href="">大家电</a></dd>
			<dd><a href="">联系客服</a></dd>
		</dl>
		<dl class="zhinan_dl">
			<dt>
				<span class='zhifu'></span>
				<a href="">支付方式</a>
			</dt>
			<dd><a href="">购物流程</a></dd>
			<dd><a href="">会员介绍</a></dd>
			<dd><a href="">团购/机票</a></dd>
			<dd><a href="">常见问题</a></dd>
			<dd><a href="">大家电</a></dd>
			<dd><a href="">联系客服</a></dd>
		</dl>
		<dl class="zhinan_dl">
			<dt>
				<span class='shouhou'></span>
				<a href="">售后服务</a>
			</dt>
			<dd><a href="">购物流程</a></dd>
			<dd><a href="">会员介绍</a></dd>
			<dd><a href="">团购/机票</a></dd>
			<dd><a href="">常见问题</a></dd>
			<dd><a href="">大家电</a></dd>
			<dd><a href="">联系客服</a></dd>
		</dl>
		<dl class="zhinan_dl">
			<dt>
				<span class='tese'></span>
				<a href="">特色服务</a>
			</dt>
			<dd><a href="">购物流程</a></dd>
			<dd><a href="">会员介绍</a></dd>
			<dd><a href="">团购/机票</a></dd>
			<dd><a href="">常见问题</a></dd>
			<dd><a href="">大家电</a></dd>
			<dd><a href="">联系客服</a></dd>
		</dl>
		<dl class="zhinan_dl_teshu fr">
			<dt>
				京东自营覆盖区县
			</dt>
			<dd class='fugai'>京东已向全国1331个区县提供自营配送服务，支持货到付款、POS机刷卡和售后上门服务。</dd>
			<a href="" class="more">查看详情></a>
		</dl>
	</div> -->
	<!-- 购物指南结束 -->
<!-- 底部导航 -->
	<!-- <div class="dibu_menu">
		<a href="">关于我们</a> <a href="">联系我们</a> <a href="">人才招聘</a> <a href="">商家入驻</a><a href="">广告服务</a> <a href="">手机京东</a> <a href="">友情链接</a><a href="">销售联盟</a><a href="">京东社区</a> <a href="">京东公益</a><a href="" class="last">English Site</a>
	</div> -->

<!-- 底部导航结束 -->
<!-- icp信息 -->

	

	<div class="icp">
		<p>
			北京市公安局朝阳分局备案编号110105014669&nbsp;|&nbsp;京ICP证070359号&nbsp;|&nbsp;互联网药品信息服务资格证编号(京)-非经营性-2011-0034 <br />
			<a href="">音像制品经营许可证苏宿批005号</a>&nbsp;|&nbsp;出版物经营许可证编号新出发(苏)批字第N-012号&nbsp;|&nbsp;互联网出版许可证编号新出网证(京)字150号
			<br />
			<a href="">网络文化经营许可证京网文[2011]0168-061号</a>Copyright&nbsp;©&nbsp;2004-2014&nbsp;&nbsp;京东JD.com&nbsp;版权所有	
			<br />
			ADo旗下网站：<a href="">360TOP</a><a href="">迷你挑</a>
		</p>
		<div class="icp_img clear">
			<a href="" class="icp_img1"><img src="http://localhost/dshop/template/default/images/icp_img1.gif" alt="" /></a>
			<a href="" class="icp_img2"><img src="http://localhost/dshop/template/default/images/icp_img2.gif" alt="" /></a>
			<a href="" class="icp_img3"><img src="http://localhost/dshop/template/default/images/icp_img3.png" alt="" /></a>
			<a href="" class="icp_img3"><img src="http://localhost/dshop/template/default/images/icp_img4.png" alt="" /></a>
		</div>

	</div>
	<!-- icp信息结束 -->
	
	
<!-- 中间主体区域结束 -->
</div>
</body>

</html>

